.class public Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;
.super Landroid/widget/PopupWindow;
.source "GuidePopWindow.java"


# instance fields
.field private mBgResId:I

.field private mContext:Landroid/content/Context;

.field private mPopText:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;I)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "popText"    # Ljava/lang/String;
    .param p3, "bgResId"    # I

    .prologue
    .line 23
    invoke-direct {p0}, Landroid/widget/PopupWindow;-><init>()V

    .line 24
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mContext:Landroid/content/Context;

    .line 25
    iput-object p2, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mPopText:Ljava/lang/String;

    .line 26
    iput p3, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mBgResId:I

    .line 28
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->init()V

    .line 29
    return-void
.end method

.method private init()V
    .registers 9

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 33
    new-instance v4, Landroid/widget/TextView;

    iget-object v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mContext:Landroid/content/Context;

    invoke-direct {v4, v5}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 34
    .local v4, "textView":Landroid/widget/TextView;
    iget v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mBgResId:I

    if-eqz v5, :cond_12

    .line 35
    iget v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mBgResId:I

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 37
    :cond_12
    iget-object v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v3

    .line 38
    .local v3, "metrics":Landroid/util/DisplayMetrics;
    const/high16 v5, 0x41200000

    invoke-static {v7, v5, v3}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v1, v5

    .line 39
    .local v1, "dp_10":I
    const/high16 v5, 0x41880000

    invoke-static {v7, v5, v3}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v5

    float-to-int v2, v5

    .line 40
    .local v2, "dp_17":I
    invoke-virtual {v4, v1, v1, v1, v2}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 41
    const/4 v5, -0x1

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setTextColor(I)V

    .line 42
    const/high16 v5, 0x41800000

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setTextSize(F)V

    .line 43
    iget-object v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mPopText:Ljava/lang/String;

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 45
    new-instance v0, Landroid/widget/RelativeLayout;

    iget-object v5, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mContext:Landroid/content/Context;

    invoke-direct {v0, v5}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 46
    .local v0, "container":Landroid/widget/RelativeLayout;
    invoke-virtual {v0, v4}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    .line 47
    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->setContentView(Landroid/view/View;)V

    .line 48
    const/4 v5, -0x2

    invoke-virtual {p0, v5, v6}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->setWindowLayoutMode(II)V

    .line 49
    invoke-virtual {v4, v6, v6}, Landroid/widget/TextView;->measure(II)V

    .line 50
    invoke-virtual {v4}, Landroid/widget/TextView;->getMeasuredHeight()I

    move-result v5

    iget-object v6, p0, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->mContext:Landroid/content/Context;

    invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f090084

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v6

    add-int/2addr v5, v6

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->setHeight(I)V

    .line 52
    new-instance v5, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v5}, Landroid/graphics/drawable/BitmapDrawable;-><init>()V

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 54
    new-instance v5, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow$1;

    invoke-direct {v5, p0}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow$1;-><init>(Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;)V

    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/activity/fragment/GuidePopWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    .line 62
    invoke-static {v4}, Lcom/brixd/niceapp/animator/AnimatorUtils;->animateShake(Landroid/view/View;)V

    .line 63
    return-void
.end method
